package com.webonn.frame.util;

import org.apache.commons.codec.digest.DigestUtils;

/**
 * Created by Administrator on 2016/12/5.
 */
public class PasswordUtils {
    public static String enpassword(String password){
        return DigestUtils.md5Hex(password);
    }

    public static boolean equalsPassword(String password1, String password2){
       return password1.equalsIgnoreCase(password2) || password1.equalsIgnoreCase(DigestUtils.md5Hex(password2))
               ||password2.equalsIgnoreCase(DigestUtils.md5Hex(password1));
    }
}
